package com.hksj.Intelligentmanagement.auth.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * 菜单表
 */
@Data
@ApiModel
public class MenuDTO{

    @ApiModelProperty("主键")
    @NotBlank(message = "id不为空",groups = MenuDTO.Update.class )
    private String id;

    @ApiModelProperty(value = "父级菜单id")
    @NotBlank(message = "pid不为空",groups = {MenuDTO.Create.class} )
    private String pid;

    @ApiModelProperty(value = "类型 1 = 菜单  2 = 按钮 ")
    @NotNull(message = "类型不为空",groups = {MenuDTO.Create.class} )
    private Integer type;

    @ApiModelProperty(value = "菜单名")
    @NotBlank(message = "菜单名不为空",groups = {MenuDTO.Create.class} )
    private String menuName;

    @ApiModelProperty(value = "路由地址")
    @NotBlank(message = "路由地址不为空",groups = {MenuDTO.Create.class} )
    private String path;

    @ApiModelProperty(value = "组件路径")
    private String component;

    @ApiModelProperty(value = "菜单状态（0正常 1停用）")
    @NotBlank(message = "菜单状态不为空",groups = {MenuDTO.Create.class} )
    private String status;

    @ApiModelProperty(value = "权限标识")
    @NotBlank(message = "权限标识不为空",groups = {MenuDTO.Create.class} )
    private String perms;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "排序号")
    private Integer sortNo;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "跳转路径")
    private String redirect;

    public interface Create{

    }

    public interface Update{

    }
}
